﻿using System;
using System.Text;
using System.Collections.Generic;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

using LuaInterface;

namespace EuphoricEngine.Components
{
    public class Console : Component, I2DComponent
    {
        #region I2DComponent Members

        public Rectangle rectangle
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        SpriteFont _font;

        int _lineHeight;
        const int _linesToShow = 6;
        const int _linesToStore = 30;

        List<string> _lines = new List<string>();

        public Console()
        {
            //
        }

        private void AddLine(string line)
        {
            if (_lines.Count == _linesToStore)
            {
                _lines.RemoveAt(0);
                _lines.Add(line);
            }
        }

        private void Clear()
        {
            _lines.Clear();
        }
    }
}